import { defineStore } from "pinia";
 const userstore=defineStore("user",{
    state:()=>{
        return {
            msg:"hello",
            count:99999,
            birth:"1998-08-20"
        }
    },
    getters:{
        age:(state)=>{return new Date().getFullYear()-new Date(state.birth).getFullYear()}
    },
    actions:{
        tool(){
            this.msg="2222222222"
        }
    }
})
export default userstore;
